<template>
  <div class="case-box">
    <div class="title">
      案例库
      <div class="more-btn" @click="toPage">更多</div>
    </div>
    <div class="case-list">
      <CaseItem v-for="(item, index) of data" :key="index" :data="item" />
    </div>
  </div>
</template>

<script>
import CaseItem from '@/views/home/components/CaseItem';
// import { articlesList } from '@/api/api';

export default {
  props: {
    data: {
      type: Array,
      default() {
        return []
      }
    }
  },
  components: {
    CaseItem
  },
  data() {
    return {
      list: []
    }
  },
  methods: {
    toPage() {
      let routerJump = this.$router.resolve({ name: 'CaseLibrary' });
      window.open(routerJump.href, '_blank');
    }
  }
}
</script>

<style lang="scss" scoped>
.case-box {
  padding-top: 52px;
  padding-bottom: 52px;
  .title {
    height: 32px;
    font-size: 24px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #272727;
    line-height: 32px;
    margin-bottom: 24px;
    .more-btn {
      height: 18px;
      font-size: 14px;
      
      font-weight: 400;
      color: #696969;
      line-height: 18px;
      float: right;
      margin-top: 7px;
      cursor: pointer;
    }
  }
  .case-list {
    width: 100%;
    background: #FFFFFF;
    border-radius: 4px;
  }
}
</style>